/*
 * @Author: zoubotao
 * @Date: 2021-04-25 13:55:26
 * @LastEditors: zengy
 * @LastEditTime: 2021-06-18 09:47:01
 * @FilePath: \Mics3.0_3DViewer_WEB\src\plugins\echarts.js
 */
// 文档 https://github.com/ecomfe/vue-echarts/blob/main/README.zh-Hans.md
import ECharts from 'vue-echarts';
import { use } from 'echarts/core';

// 手动引入 ECharts 各模块来减小打包体积
import { CanvasRenderer } from 'echarts/renderers';
import {
  BarChart,
  LineChart,
  PieChart,
  PictorialBarChart,
} from 'echarts/charts';
import {
  GridComponent,
  TooltipComponent,
  TitleComponent,
  LegendComponent,
  DatasetComponent,
  GraphicComponent,
} from 'echarts/components';

use([
  CanvasRenderer,
  BarChart,
  LineChart,
  PieChart,
  PictorialBarChart,
  GridComponent,
  TooltipComponent,
  TitleComponent,
  LegendComponent,
  DatasetComponent,
  GraphicComponent,
]);

export default {
  install(app) {
    app.component('v-chart', ECharts);
  },
};
